﻿<%@ Page Title="" Language="C#" MasterPageFile="~/PBOfficeMaster.master" AutoEventWireup="true"
    CodeFile="RoleManager.aspx.cs" Inherits="SystemManager_RoleManager" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <link type="text/css" rel="Stylesheet" href="../css/SystemManagerCss.css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div style="width: 864px;">
        <div class="branchtop">
            <table>
                <tr>
                    <td>
                        当前位置
                    </td>
                    <td>
                        <div class="lbBranch">
                            角色管理</div>
                    </td>
                </tr>
            </table>
        </div>
        <hr />
        <div style="margin-left: 180px;">
            <table>
                <tr>
                    <td style="text-align: left; font-size: 14px; line-height: 30px;">
                        角色名称：
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:TextBox ID="txtRoleName" runat="server" Width="240px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td style="text-align: left; font-size: 14px; line-height: 30px;">
                        角色说明：
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:TextBox ID="txtRoleDesc" TextMode="MultiLine" Height="50px" Width="245px" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Button ID="btnSave" runat="server" CssClass="btnBranch" Text="保 存" 
                            onclick="btnSave_Click" />&nbsp;<asp:Button
                            ID="btnModify" runat="server" CssClass="btnBranch" Text="保存修改" 
                            onclick="btnModify_Click" />
                    </td>
                </tr>
            </table>
        </div>
        <div style="margin-left: 50px; margin-top: 5px">
            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" BorderColor="#00CCFF"
                BorderStyle="Solid" Font-Size="14px" Width="740px" DataKeyNames="RoleId" 
                onrowdeleting="GridView1_RowDeleting" 
                onrowupdating="GridView1_RowUpdating" onrowcommand="GridView1_RowCommand">
                <AlternatingRowStyle BackColor="#F4FCFE" />
                <Columns>
                    <asp:BoundField DataField="RoleName" HeaderText="角色名称" SortExpression="RoleName" />
                    <asp:BoundField DataField="RoleDesc" HeaderText="角色说明" SortExpression="RoleDesc" />
                    <asp:TemplateField HeaderText="修改">
                        <EditItemTemplate>
                            <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:ImageButton ID="ImageButton1" runat="server" CommandName="Update" Height="15px" ImageUrl="~/imges/modify.png"
                                Width="15px" />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="删除">
                        <EditItemTemplate>
                            <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:ImageButton ID="ImageButton2" runat="server" CommandName="Delete" Height="15px" ImageUrl="~/imges/delete.png"
                                Width="15px" />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="分配角色权限">
                        <ItemTemplate>
                            <asp:LinkButton ID="LinkButton1" runat="server" CssClass="hlCss" CommandArgument='<%# Eval("RoleId") %>'  Text="分配权限" CommandName="right"></asp:LinkButton>
                            <%--<asp:HyperLink ID="HyperLink1" runat="server"   ></asp:HyperLink>--%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="分配角色用户">
                        <ItemTemplate>
                            <asp:LinkButton ID="LinkButton2" runat="server" CssClass="hlCss" Text="分配用户" CommandName="stf"></asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <HeaderStyle BackColor="#66CCFD" BorderColor="#33CCFF" Font-Size="14px" ForeColor="White" />
                <RowStyle BackColor="#FDFEFF" />
            </asp:GridView>
        </div>
    </div>
</asp:Content>
